Using JavaScript Procedures

Knowledge Builder Release 10 (JavaScript & Mobile deployments) supports the use of JavaScript as an alternative command language to the standard XpertRule procedural @commands.

JavaScript can be used in place of XpertRule commands in;

The same application can mix and match between JavaScript & XpertRule @ Commands (in different Procedures)

Because JavaScript code is generated as-is, it is critical that the developer ensure that its' syntax is correct. If the syntax is wrong (e.g. missing semicolon or brace) then the whole application will not load into the Browser (you will get a syntax error on loading main.html). The following tips can help with eliminating errors in syntax:

Note: a common mistake when coding in JavaScript is missing the semicolon (;) at the end of each line.

Overview

Referencing Objects

Referencing Dialogs

Special Methods

Indirect Referencing

Example of @Commands Vs JavaScript